home *** CD-ROM | disk | FTP | other *** search
/ Pro-Cent Games: For Only 1 Cent! / Pro Cent Games.bin / BrainTest.exe / scripts / DefineButton2_54 / BUTTONCONDACTION on(press).as
Encoding:
Text File  |  2004-03-16  |  529 b   |  26 lines

  1. on(press){
  2.    tellTarget("_root.1")
  3.    {
  4.       gotoAndPlay(1);
  5.    }
  6.    i = _root.index;
  7.    set("_root.userArray[" + i + "]",1);
  8.    if(eval("_root.userArray[" + i + "]") eq eval("_root.computerArray[" + i + "]"))
  9.    {
  10.       _root.userIndex += 1;
  11.       _root.index += 1;
  12.       _root.score = _root.count * _root.count;
  13.    }
  14.    else
  15.    {
  16.       gotoAndStop(30);
  17.    }
  18.    if(_root.userIndex >= _root.count)
  19.    {
  20.       _root.p = 1;
  21.       _root.index = 1;
  22.       _root.userIndex = 0;
  23.       gotoAndPlay(15);
  24.    }
  25. }
  26.